/*
 * @(#)QuerySlotName.java
 * Date 2013-09-01
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.registry.constant;

/**
 * Enum description
 *
 */
public enum QuerySlotName {
    
    AssociationTypes("$AssociationTypes"),
    HomeCommunityId("$homeCommunityId"),
    PatientId("$patientId"),
    Uuid("$uuid"),
    
    XDSDocumentEntryAuthorPerson("$XDSDocumentEntryAuthorPerson"), 
    XDSDocumentEntryClassCode("$XDSDocumentEntryClassCode"), 
    XDSDocumentEntryClassCodeScheme("$XDSDocumentEntryClassCodeScheme"), 
    XDSDocumentEntryConfidentialityCode("$XDSDocumentEntryConfidentialityCode"), 
    XDSDocumentEntryConfidentialityCodeScheme("$XDSDocumentEntryConfidentialityCodeScheme"), 
    XDSDocumentEntryCreationTimeFrom("$XDSDocumentEntryCreationTimeFrom"), 
    XDSDocumentEntryCreationTimeTo("$XDSDocumentEntryCreationTimeTo"), 
    XDSDocumentEntryEntryUUID("$XDSDocumentEntryEntryUUID"),
    XDSDocumentEntryEventCodeList("$XDSDocumentEntryEventCodeList"), 
    XDSDocumentEntryEventCodeListScheme("$XDSDocumentEntryEventCodeListScheme"), 
    XDSDocumentEntryFormatCode("$XDSDocumentEntryFormatCode"), 
    XDSDocumentEntryFormatCodeScheme("$XDSDocumentEntryFormatCodeScheme"), 
    XDSDocumentEntryHealthcareFacilityTypeCode("$XDSDocumentEntryHealthcareFacilityTypeCode"), 
    XDSDocumentEntryHealthcareFacilityTypeCodeScheme("$XDSDocumentEntryHealthcareFacilityTypeCodeScheme"), 
    XDSDocumentEntryPatientId("$XDSDocumentEntryPatientId"), 
    XDSDocumentEntryPracticeSettingCode("$XDSDocumentEntryPracticeSettingCode"), 
    XDSDocumentEntryPracticeSettingCodeScheme("$XDSDocumentEntryPracticeSettingCodeScheme"), 
    XDSDocumentEntryServiceStartTimeFrom("$XDSDocumentEntryServiceStartTimeFrom"), 
    XDSDocumentEntryServiceStartTimeTo("$XDSDocumentEntryServiceStartTimeTo"), 
    XDSDocumentEntryServiceStopTimeFrom("$XDSDocumentEntryServiceStopTimeFrom"), 
    XDSDocumentEntryServiceStopTimeTo("$XDSDocumentEntryServiceStopTimeTo"), 
    XDSDocumentEntryStatus("$XDSDocumentEntryStatus"), 
    XDSDocumentEntryTypeCode("$XDSDocumentEntryTypeCode"),
    XDSDocumentEntryTypeScheme("$XDSDocumentEntryTypeScheme"),
    XDSDocumentEntryUniqueId("$XDSDocumentEntryUniqueId"),
    
    XDSFolderCodeList("$XDSFolderCodeList"),
    XDSFolderCodeListScheme("$XDSFolderCodeListScheme"),
    XDSFolderEntryUUID("$XDSFolderEntryUUID"),
    XDSFolderLastUpdateTimeFrom("$XDSFolderLastUpdateTimeFrom"),
    XDSFolderLastUpdateTimeTo("$XDSFolderLastUpdateTimeTo"),
    XDSFolderPatientId("$XDSFolderPatientId"),
    XDSFolderStatus("$XDSFolderStatus"),
    XDSFolderUniqueId("$XDSFolderUniqueId"),
    
    XDSSubmissionSetAuthorPerson("$XDSSubmissionSetAuthorPerson"),
    XDSSubmissionSetContentType("$XDSSubmissionSetContentType"),
    XDSSubmissionSetContentTypeScheme("$XDSSubmissionSetContentTypeScheme"),
    XDSSubmissionSetEntryUUID("$XDSSubmissionSetEntryUUID"),
    XDSSubmissionSetPatientId("$XDSSubmissionSetPatientId"),
    XDSSubmissionSetSourceId("$XDSSubmissionSetSourceId"),
    XDSSubmissionSetStatus("$XDSSubmissionSetStatus"),
    XDSSubmissionSetSubmissionTimeFrom("$XDSSubmissionSetSubmissionTimeFrom"),
    XDSSubmissionSetSubmissionTimeTo("$XDSSubmissionSetSubmissionTimeTo"),
    XDSSubmissionSetUniqueId("$XDSSubmissionSetUniqueId");
              
    /** Field description */
    private final String code;

    /**
     * Constructs ...
     *
     *
     * @param c
     */
    private QuerySlotName(String c) {
        this.code = c;
    }

    /**
     * Method description
     *
     *
     * @param name
     *
     * @return
     */
    public static QuerySlotName toQuerySlotName(String name) {

        QuerySlotName result = null;

        for (QuerySlotName myname : values()) {

            if (myname.code.equals(name)) {

                result = myname;

                break;
            }
        }

        return result;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getCode() {
        return this.code;
    }
}
